﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using Boxi.MobileService.Model;

namespace Boxi.MobileService
{
    [ServiceContract(Namespace = "Boxi.Leaderboard")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class Leaderboard
    {
        [OperationContract(Name = "GetLeaderboard")]
        [ServiceKnownType(typeof(LeaderboardScoreInfo[]))]
        public LeaderboardScoreInfo[] GetLeaderboard()
        {
            List<LeaderboardScoreInfo> leaderboardScores = new List<LeaderboardScoreInfo>();
            leaderboardScores.Add(new LeaderboardScoreInfo(3, 3, 70));
            leaderboardScores.Add(new LeaderboardScoreInfo(2, 2, 40));
            leaderboardScores.Add(new LeaderboardScoreInfo(1, 1, 20));
            return leaderboardScores.ToArray();
        }
    }
}
